package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.Account;
import cn.wolfcode.crm.domain.Gift;
import cn.wolfcode.crm.domain.Product;
import cn.wolfcode.crm.serivce.IAccountService;
import cn.wolfcode.crm.serivce.IGiftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("record")
public class recordController {
    @Autowired
    //引入账单
    private IGiftService giftService;
    //引入出库service
    @RequestMapping("view")
    public String view() throws Exception {
        return "record";
    }
    @RequestMapping("recordGift")
    @ResponseBody
    public List<Gift>recordGift(){
       List<Gift>gifts = giftService.recordGift();
       return gifts;
    }
}
